
<template>
	<div class="mainContent">
		<pathTracking :path='Model.path' />
		<div class="deliverynoti-container">
			<div class="bgWhite bgRadius">
				<el-row>
					<div class="common-table-title">
						<div class="common-table-icon"></div>
						<div class="common-table-fl">查询条件</div>
					</div>
				</el-row>
				<!-- 高级搜索 -->
				<advancedSearch
					:option="Model.filterOption3"
					@getChild="showNotSureBarCodeP2"
					@onSearch="toSearchNotSureBarCode"
					@onClear="toClear"
				></advancedSearch>
			</div>
			<div class="shopTable">
				<el-row>
					<div class="common-table-title">
						<div class="common-table-icon"></div>
						<div class="common-table-fl">商品售价列表</div>
						<div class="common-btn-group">
							<div class="common-table-btn-item" @click="addChooseShop(true)">新增预选商品</div>
							<div class="common-table-btn-item" @click="removeChooseShop(true)">删除预选商品</div>
							<div class="common-table-btn-item" @click="addTeam(true)">新增分组</div>
							<div class="common-table-btn-item" @click="joinTeam(true)">加入分组</div>
						</div>
					</div>
				</el-row>
				<div>
					<el-row class="table-bg">
						<el-table :data="Model.dialogTableData" style="width: 100%" :default-sort="{prop: 'date', order: 'descending'}" @selection-change="handleSelectionChange">
							<!-- <el-table-column type="selection" width="50" fixed></el-table-column> -->
							<el-table-column type="selection" width="50" fixed></el-table-column>
							<el-table-column prop="finishProduct" label="现货成品" width="120"></el-table-column>
							<el-table-column prop="store" label="门店" width="140"></el-table-column>
							<el-table-column prop="location" label="仓位" width="140"></el-table-column>
							<el-table-column prop="modelName" label="款式名称" width="120"></el-table-column>
							<el-table-column prop="xxx" label="款式号" width="120"></el-table-column>
							<el-table-column prop="productCategoryCategory" label="品类" width="140"></el-table-column>
							<el-table-column prop="aSeriesOf" label="系列" width="120"></el-table-column>
							<el-table-column prop="barCode" label="条码" width="140"></el-table-column>
							<el-table-column prop="handInch" label="手寸" sortable width="120"></el-table-column>
							<el-table-column prop="trayMaterial" label="材质" width="140"></el-table-column>
							<el-table-column prop="insert" label="钻重" sortable width="120"></el-table-column>
							<el-table-column prop="theMainStoneShape" label="主石形状" sortable width="140"></el-table-column>
							<el-table-column prop="theMainStoneAppearance" label="主石外观" width="120"></el-table-column>
							<el-table-column prop="cut" label="切工" sortable width="120"></el-table-column>
							<el-table-column prop="polishing" label="抛光" sortable width="120"></el-table-column>
							<el-table-column prop="colour" label="颜色" sortable width="120"></el-table-column>
							<el-table-column prop="cleanliness" label="净度" sortable sortable width="120"></el-table-column>
							<el-table-column prop="symmetric" label="对称" sortable width="120"></el-table-column>
							<el-table-column prop="goodsPrice" label="价格/RMB" sortable width="120"></el-table-column>
						</el-table>
					</el-row>
					<!-- 分页 -->
					<el-row class="pagination-cont">
						<el-pagination
							@size-change="handleSizeChange"
							background
							@current-change="handleCurrentChange"
							:current-page="Model.pager.params.pageIndex"
							:page-sizes="Model.pager.pageSizeArr"
							:page-size="Model.pager.params.pageSize"
							:pager-count="5"
							layout="total, sizes, prev, pager, next, jumper"
							:total="Model.pager.pageTotal"
						></el-pagination>
					</el-row>
				</div>
			</div>
		</div>
		<el-dialog title :visible.sync="Model.addProduct" class="addProduct">
			<div class="common-table-title">
				<div class="common-table-icon"></div>
				<div class="common-table-fl">加入分组</div>
			</div>
			<div class="productBody">
				<div class="productFirst">
					<el-radio-group v-model="Model.chooseTeam">
						<ul class="TeamList">
							<li v-for="(item, index) in Model.TeamName" :key = "index">
								<el-radio :label="item.id">{{item.isEdit ? '' : item.name }}</el-radio>
								<el-input class="writeInput" ref="teamInput" @blur="SaveWrite(item)" v-show="item.isEdit" v-model="item.name"></el-input>
								<div class="Teamoperation">
									<i class="Btnwrite" @click="Towrite(item,index)"></i>
									<i class="Btndelete" @click="del(item,index)">删除</i>
								</div>
							</li>
						</ul>
					</el-radio-group>
					<div class="normal-btn-group btnCenter">
						<div class="normal-btn query-btn" @click="addSure(true)">确认</div>
						<div class="normal-btn cancel-btn" @click="Model.addProduct=false">取消</div>		
					</div>
				</div>
			</div>
		</el-dialog>
		<el-dialog title :visible.sync="Model.addTeam" class="addTeam">
			<div class="common-table-title">
				<div class="common-table-icon"></div>
				<div class="common-table-fl">提示</div>
			</div>
			<div class="productBody">
				<div class="productSec">
					<el-form ref="form" size="small" :inline="false">
						<el-form-item label="分组名称:" >
							<el-input v-model="Model.Groupingname"></el-input>
						</el-form-item>
					</el-form>
					<div class="normal-btn-group btnCenter">
						<div class="normal-btn query-btn" @click="addSureteam(true)">确认</div>
						<div class="normal-btn empty-input-btn" @click="Model.addTeam=false">取消</div>
					</div>
				</div>
			</div>
		</el-dialog>
		<el-dialog title :visible.sync="Model.removeChooseShop">
			<div class="common-table-title">
				<div class="common-table-icon"></div>
				<div class="common-table-fl">提示</div>
			</div>
			<div class="productBody">
				<div class="productFirst">
					<p>确定删除预选商品么？</p>
					<div class="normal-btn-group btnCenter">
						<div class="normal-btn query-btn" @click="addSure(true)">确认</div>
						<div class="normal-btn empty-input-btn" @click="toCancel(false)">取消</div>
					</div>
				</div>
			</div>
		</el-dialog>
	</div>
</template>

<script>
	import pathTracking from '@/components/common/pathTracking';
	import pagination from "@/components/common/pagination.vue";
	import advancedSearch from "@/components/common/filter/advancedSearch";
	import { getDateString } from "@/assets/js/common.js"
	import Model from './model.js'
	import Controller from './controller.js'
	export default {
		name: "priceCheck",
		mixins: [Model, Controller],
		components: {
			pathTracking,
			pagination,
			advancedSearch
		},
	};
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped lang="less">
	@import "./index.less";
</style>